/*
* @author dumeng
*/
'use strict'
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

/**
 * 列表查询
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/queryPage',
    method: 'post',
    data
  })
}

/**
 * 新增
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/update',
    method: 'post',
    data
  })
}

/**
 * 详情
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/get',
    method: 'post',
    data
  })
}

/**
 * 删除
 */
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/deleteById',
    method: 'post',
    data
  })
}

/**
 * 发布/取消发布
 */
export function updateState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/release',
    method: 'post',
    data
  })
}
/**
 * 置顶/取消置顶
 */
export function updateIsTop(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/updateIsTop',
    method: 'post',
    data
  })
}

/**
 * 开关修改
 */
export function set(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/switchStatusChange',
    method: 'post',
    data
  })
}

/**
 * 统一修改-评分状态
 */
export function setEvaluateState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/updateEvaluateState',
    method: 'post',
    data
  })
}

/**
 * 统一修改-点赞状态
 */
export function setFavorState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/updateFavorState',
    method: 'post',
    data
  })
}

/**
 * 统一修改-评论状态
 */
export function setCommentState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/updateCommentState',
    method: 'post',
    data
  })
}

/**
 * 评论列表
 */
export function queryPage4comment(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/queryPageComment',
    method: 'post',
    data
  })
}
/**
 * 修改评论状态
 */
export function update4comment(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/updateCommentStatus',
    method: 'post',
    data
  })
}
/**
 * 查看评论祖先
 */
export function queryPage4commentParent(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/zjhd/queryPageCommentParent',
    method: 'post',
    data
  })
}
